package de.jadehs.cosima.util;

import java.util.List;

import de.jadehs.cosima.Instruction;
import de.jadehs.cosima.Transition;

public class PrettyPrintUtil {

	public static String prettyPrintStartInstructions(Transition t) {
		return prettyPrintInstructions(t.getStartInstructions());
	}

	public static String prettyPrintInstructions(List<Instruction> instructions) {
		StringBuffer buf = new StringBuffer();
	
		for (Instruction instr : instructions) {
			buf.append(instr.toString()).append(", ");
		}
	
		if (buf.length() > 0) {
			buf.delete(buf.length() - 2, buf.length());
		}
	
		return buf.toString();
	}

}
